// vite.config.js
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';

export default defineConfig({
  plugins: [react()],
  server: {
    proxy: {
      '/api': {
        target: 'http://218.244.141.86:8080',
        changeOrigin: true,
        secure: false,
      },
      // 👇 新增：代理 /uploads/ 路径
      '/uploads': {
        target: 'http://218.244.141.86:8080',
        changeOrigin: true,
        secure: false,
      }
    }
  }
});